package com.chaomian.plus.starter.model;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * @author chaomian
 */
@Data
public class BasePageQuery extends BaseQuery {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(required = false, value = "分页大小", example = "10")
    private Long pageSize = 10L;

    @ApiModelProperty(required = false, value = "分页页码", example = "1")
    private Long pageNum = 1L;

    public Page toPage() {
        //mybatis-plus分页
        return new Page(this.pageNum, this.pageSize);
    }
}
